import java.util.ArrayList;
import java.util.List;

enum Gender {
    男, 女
}

public class Person {
    private Gender gender;
    private String name;
    private int age;
    private String id;
    private List<book> list;

    public Person() {
    }

    public void ShowLend() {
        for (int i = 0; i < list.size(); i++) {
            System.out.println(i+1 +" 书名： " + list.get(i).getName() + " 作者： " + list.get(i).getAuthor() + "借书剩余天数：" + list.get(i).getLendTime());
        }
    }

    public Person(Gender gender, String name, int age, String id) {
        this.gender = gender;
        this.name = name;
        this.age = age;
        this.id = id;
        list = new ArrayList<book>();
    }


    public List<book> getList() {
        return list;
    }


    public void ShowMessage() {
        System.out.println("姓名： " + this.name + " 性别： " + this.gender + " 年龄： " + this.age);
    }

    @Override
    public String toString() {
        return "Person{" +
                "gender=" + gender +
                ", name='" + name + '\'' +
                ", age=" + age +
                ", id='" + id + '\'' +
                '}';
    }


}

